<?php
class Default_Model_Contact extends Zend_Db_Table {
	protected $_name    = 'contact';
	
	protected $_primary = 'id';
	
	protected $_dependentTables = array('Default_Model_ContactTour');
	
	// creat item in select box
	public function itemInSelectbox(){
		$db = Zend_Registry::get('connectDb');
		//$db = Zend_Db::factory($adapter,$config);
		
	    $select = $db->select()
		             ->from('contact AS c',array('id','full_name'))
		             ->order('c.order ASC');
	    
		$result  = $db->fetchPairs($select);
		array_unshift($result,'----Select----');
	
		return $result;
	
	}
}